<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>组合式API使用</title>
</head>
<body>
    <!-- <div id="app">
        {{num}}
        <button @click="add">add</button>
    </div> -->
    <div id="app"></div>
    <script src="./vue.global.js"></script>
    <!-- <script>
        const {createApp,ref}=Vue;
        createApp({
            setup(){
                let num= ref(10);
                function add() {
                    num.value++;
                }
                return{
                    num,add
                }
            }
        }).mount('#app');
    </script> -->
    <script>
        const {createApp,ref}=Vue;
        createApp({
            data(){
                return {msg:"hello"}
            },
            template:`<div>{{msg}}</div>`,
        }).mount('#app');
    </script>
</body>
</html>